package com.learner.course.repository;

import com.learner.pojo.course.CourseBase;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.util.*;

/**
 * @author ice2020x
 * @Description: 课程基本信息的数据库映射
 */
@Component
@Repository
public interface CourseBaseRepository extends JpaRepository<CourseBase, String>, JpaSpecificationExecutor<CourseBase> {

    /**
     * 根据讲师id或者机构id查询基础课程
     *
     * @param userId userId
     * @return 结果
     */
    List<CourseBase> findByUserId(String userId);

}
